package com.lordjoe.collectiveintelligence.data;

/**
 * com.lordjoe.collectiveintelligence.data.EnumDifferenceDistanceMetric
 *
 * @author Steve Lewis
 * @date May 12, 2009
 */
public class EnumDifferenceDistanceMetric implements IDistanceMetric<Enum>
{
    public static EnumDifferenceDistanceMetric[] EMPTY_ARRAY = {};
    public static Class THIS_CLASS = EnumDifferenceDistanceMetric.class;

    /**
     * same is 0 otherwise 1
     * @param t1
     * @param t2
     * @return
     */
    public double getDistance(Enum t1, Enum t2)
    {
        if(t1 == t2)
            return 0;
        else
            return 1;
    }
}